package sis.ra.yahoor.result;

import sis.ra.utility.Utils;

public class separateSentence {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String content=Utils.readFile("C:\\Documents and Settings\\I820753\\Desktop\\dataset\\result1006.all");
		String [] lines=content.split("\n");
		int count=0;
		for (int i=0;i<lines.length;i++)
		{
			if (lines[i].length()<1) continue;
			if (lines[i].startsWith("C:\\Documents and Settings\\I820753\\Desktop\\dataset\\yahoo result_1006"))
			{
				System.out.println(lines[i]);
				System.out.println(lines[i+1]);
				Utils.writeToFile("C:\\Documents and Settings\\I820753\\Desktop\\dataset\\result1006.snippet", lines[i],true,true);
				Utils.writeToFile("C:\\Documents and Settings\\I820753\\Desktop\\dataset\\result1006.snippet", lines[i+1],true,true);
				i=i+1;
			}else
			{
				
				String [] snipps=lines[i].split("<b>\\.\\.\\.</b>");
				for (int j=0;j<snipps.length;j++)
				{
					if (snipps[j].trim().length()<2) continue;
//					String [] snipps2=snipps[j].split("<b>...</b>");
//					for (int m=0;m<snipps2.length;m++)
					System.out.println("==>"+snipps[j].trim());
					Utils.writeToFile("C:\\Documents and Settings\\I820753\\Desktop\\dataset\\result1006.snippet","==>"+snipps[j].trim(),true,true );
					count++;
				}
			}
		}
		System.out.println(count);

	}

}
